package entity;

import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;

/**
 * @author 63495
 * @Description: 成绩类//
 * @date 2022/3/25 21:57
 */
@Getter
@Setter
public class Score extends BaseEntity{

    private Long id;
    /** 分数 */
    private Double fraction;

    private Course course;
    private Student student;

    @Override
    public JSONObject toJson() {
        JSONObject json = new JSONObject();
        json.put("id",this.id);
        json.put("fraction",this.fraction);
        json.put("courseId",this.course.getId());
        json.put("studentId",this.student.getId());
        return json;
    }
}
